import bean.StudentJob;
import dao.JobDao;
import dao.StudentDao;
import util.Util;

import java.util.List;

public class Main {
    public static void main(String[] args) {
        List<StudentJob> studentJobs;
        //读取作业信息
        studentJobs = Util.readExcel("F:\\studentJob\\job1.xls",1);
//        System.out.println(studentJobs.size());
//        //克隆远程作业代码到代码
//        for (StudentJob studentJob : studentJobs) {
//            if (Util.cloneCode(studentJob))
//                System.out.println(studentJob.getId() + "克隆成功；");
//            else
//                System.out.println(studentJob.getId() + "克隆失败；");
//        }
        //到仓库中读出作业提交信息
        for (StudentJob studentJob : studentJobs) {
            Util.readCommitInfo(studentJob);
        }
        //输出本次作业的版本信息
        System.out.println(studentJobs.size());
        for (StudentJob studentJob : studentJobs) {
            StudentDao.saveStudent(studentJob.getStudentId(),studentJob.getName());
            JobDao.saveJobInfo(studentJob);
            //System.out.println(studentJob.getGitVersionInfos().size());
        }


    }
}
